export const ttlOptions = [
  {
    label: '30秒',
    value: 30,
  },
  {
    label: '1分钟',
    value: 60,
  },
  {
    label: '5分钟',
    value: 300,
  },
  {
    label: '10分钟',
    value: 600,
  },
  {
    label: '30分钟',
    value: 1800,
  },
  {
    label: '1小时',
    value: 3600,
  },
  {
    label: '12小时',
    value: 42300,
  },
  {
    label: '1天',
    value: 86400,
  },
]

export enum SITE_RESOLVE_STATUS {
  PROCESSING = 1,
  SUCCESS = 2,
  FAILED = 3,
  PAUSED = 4,
}

export const siteResolveStatusOptions = [
  {
    label: '处理中',
    value: SITE_RESOLVE_STATUS.PROCESSING,
  },
  {
    label: '成功',
    value: SITE_RESOLVE_STATUS.SUCCESS,
  },
  {
    label: '失败',
    value: SITE_RESOLVE_STATUS.FAILED,
  },
  {
    label: '成功', // 暂停解析
    value: SITE_RESOLVE_STATUS.PAUSED,
  },
]
export enum MODE_STATUS {
  ONLINE = 1,
  OFFLINE,
}

export const modeStatusOptions = [
  {
    label: '上线',
    value: MODE_STATUS.ONLINE,
  },
  {
    label: '下线',
    value: MODE_STATUS.OFFLINE,
  },
]
export enum POOL_TYPE_STATUS {
  STATIC = 1,
  CDN_DYNAMIC,
}

export const poolTypeOptions = [
  {
    label: '静态地址池',
    value: POOL_TYPE_STATUS.STATIC,
  },
  {
    label: 'CDN 动态地址池',
    value: POOL_TYPE_STATUS.CDN_DYNAMIC,
  },
]
export enum DNS_NODE_STATUS {
  INIT = 0,
  NORMAL,
  OFFLINE,
}

export const DnsNodeStatusOptions = [
  {
    label: '初始化',
    value: DNS_NODE_STATUS.INIT,
  },
  {
    label: '运行中',
    value: DNS_NODE_STATUS.NORMAL,
  },
  {
    label: '离线',
    value: DNS_NODE_STATUS.OFFLINE,
  },
]
export enum RECORD_VALUE {
  A = 'A',
  AAAA = 'AAAA',
  CNAME = 'CNAME',
  MX = 'MX',
  NS = 'NS',
  TXT = 'TXT',
  CAA = 'CAA',
}

export const RECORD_TYPE_OPTIONS = [
  { label: 'A', value: RECORD_VALUE.A, desc: '- 将域名指向一个 IPv4 地址' },
  {
    label: 'AAAA',
    value: RECORD_VALUE.AAAA,
    desc: '- 将域名指向一个 IPv6 地址',
  },
  { label: 'CNAME', value: RECORD_VALUE.CNAME, desc: '- 将域名指向另一个域名' },
  { label: 'MX', value: RECORD_VALUE.MX, desc: '- 将域名指向邮件服务器地址' },
  {
    label: 'NS',
    value: RECORD_VALUE.NS,
    desc: '- 将子域名指定其他 DNS 服务器解析',
  },
  {
    label: 'TXT',
    value: RECORD_VALUE.TXT,
    desc: '- 文本长度限制255，通常做 SPF 记录（反垃圾邮件）',
  },
  { label: 'CAA', value: RECORD_VALUE.CAA, desc: '- CA 证书颁发机构授权校验' },
]
